package edu.hawaii.myisern.action;

import static org.junit.Assert.assertEquals;

import org.junit.Test;
import com.meterware.httpunit.WebConversation;
import com.meterware.httpunit.WebResponse;

/**
  * Tests the log in page.
  * 
  * @author Michal Zielinski
  * @author John Hauge
  * 
  */
public class TestMyIsernActionBean  {

  /** Get the test host. */
  private String testHost = System.getProperty("test.host");
  /** The page title. */
  private String pageTitle = "MyIsern-Orange-1.3";
 
  /**
   * Tests the login page.
   *
   * @throws Exception If problems occur
   */
  @Test
  @SuppressWarnings("deprecation") //TableCell.asText() is httpunit 1.5.3, needed due to Hackystat
  public void testLogin() throws Exception {
    WebConversation conversation = new WebConversation();

    // Get welcome.jsp page and check for successful retrieval
    String Url = testHost + "myisern-orange-1.3";
    WebResponse response = conversation.getResponse(Url);
    assertEquals("Checking index.jsp retrieval", pageTitle, response.getTitle());
  }
}



  